﻿using EkStudio.com.bean.xml.reflection;
using EkStudio.com.bean.xml.RootInterface;
using System;

namespace EkStudio.com.bean.xml.WorkFlow.Node
{
    /// <summary>
    /// 工作流的全局扩展代码和节点扩展代码集合
    /// </summary>
    public class WflowModuleEventRoot: BillObjectInterface
    {
        private WflowEventPluginModule moduleEvent = null;//模块事件
        private WflowEventPluginNodeList eventNodeList = null;//节点事件


        [XmlElement]
        public WflowEventPluginModule ModuleEvent
        {
            get
            {
                return moduleEvent;
            }

            set
            {
                moduleEvent = value;
            }
        }
        [XmlElement]
        public WflowEventPluginNodeList EventNodeList
        {
            get
            {
                return eventNodeList;
            }

            set
            {
                eventNodeList = value;
            }
        }
        [XmlTransient]
        public object ParentBean
        {
            get
            {
                throw new NotImplementedException();
            }

            set
            {
                throw new NotImplementedException();
            }
        }

        public object Clone()
        {
            WflowModuleEventRoot clone = new WflowModuleEventRoot();
            if (moduleEvent != null)
            {
                clone.ModuleEvent = moduleEvent.Clone() as WflowEventPluginModule;
            }
            if (eventNodeList != null) clone.EventNodeList = eventNodeList.Clone() as WflowEventPluginNodeList;
            return clone;
        }
    }
}
